package model

import (
	"base"
	"leaf/gate"
)

type Client struct {
	gate.Agent
	id     base.ClientId
	player *Player
}

func NewClient(agent gate.Agent, id base.ClientId) *Client {
	result := new(Client)
	result.Agent = agent
	result.id = id

	return result
}

func (client *Client) Id() base.ClientId {
	return client.id
}

func (client *Client) SetPlayer(player *Player) {
	client.player = player
}

func (client *Client) Player() *Player {
	return client.player
}
